package com.njbw.user.controller;

import com.njbw.user.excel.SysUserExcelExport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.log4j.Log4j2;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

@Api(tags = "用户数据导出 controller")
@RestController
@RequestMapping("sysUserExport")
@Log4j2
public class SysUserExportController {

    @Resource
    private SysUserExcelExport sysUserExcelExport;

    @ApiOperation(value = "导出 excel", notes = "导出 excel")
    @GetMapping("exportData")
    public void exportData() {
        // 指定数据条件
        Map<String, Object> map = new HashMap<>();
        sysUserExcelExport.exportWithBigData("用户列表", map);
    }
}
